package com.ycz.sportplay.dao;

import com.ycz.sportplay.bean.User;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserDao {

    User getUserByMessage(@Param("username") String username,@Param("password") String password);

    List<User> getAllUsers(@Param("username") String username,
                           @Param("pageStart") int pageStart,@Param("pageSize") int pageSize);

    int getUserCount(@Param("username") String username);

    int updateState(@Param("id") Integer id,@Param("state") Boolean state);

    int addUser(User user);

    int deleteUser(Integer id);

    User getUserById(Integer id);

    int editUser(User user);
}

